home *** CD-ROM | disk | FTP | other *** search
/ Oh!X 2000 Spring / Oh!X 2000 Spring Special CD-ROM (Japan) (Part 2).7z / Oh!X 2000 Spring Special CD-ROM (Japan) (Part 2).bin / DXF / include / dvp.h < prev    next >
C/C++ Source or Header  |  1999-09-08  |  31KB  |  916 lines

  1. /*==========================================================================;
  2.  *
  3.  *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:    dvp.h
  6.  *  Content:    DirectDrawVideoPort include file
  7.  *
  8.  ***************************************************************************/
  9.  
  10. #ifndef __DVP_INCLUDED__
  11. #define __DVP_INCLUDED__
  12. #if defined( _WIN32 )  && !defined( _NO_COM )
  13. #define COM_NO_WINDOWS_H
  14. #include <objbase.h>
  15. #else
  16. #define IUnknown        void
  17. #endif
  18.  
  19. /*
  20.  * These definitions are required to allow polymorphic structure members (i.e. those
  21.  * that are referred to both as DWORDs and as pointers) to resolve into a type
  22.  * of correct size to hold the largest of those two types (i.e. pointer) on 64 bit
  23.  * systems. For 32 bit environments, ULONG_PTR resolves to a DWORD.
  24.  */
  25. #ifndef MAXULONG_PTR
  26. #define ULONG_PTR    DWORD
  27. #endif //MAXULONG_PTR
  28.  
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32.  
  33. /*
  34.  * GUIDS used by DirectDrawVideoPort objects
  35.  */
  36. #if defined( _WIN32 ) && (!defined( _NO_COM ) || defined( DEFINE_GUID ))
  37. DEFINE_GUID( IID_IDDVideoPortContainer,        0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  38. DEFINE_GUID( IID_IDirectDrawVideoPort,        0xB36D93E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  39.  
  40. DEFINE_GUID( DDVPTYPE_E_HREFH_VREFH, 0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  41. DEFINE_GUID( DDVPTYPE_E_HREFH_VREFL, 0x92783220L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  42. DEFINE_GUID( DDVPTYPE_E_HREFL_VREFH, 0xA07A02E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  43. DEFINE_GUID( DDVPTYPE_E_HREFL_VREFL, 0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  44. DEFINE_GUID( DDVPTYPE_CCIR656,         0xFCA326A0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  45. DEFINE_GUID( DDVPTYPE_BROOKTREE,     0x1352A560L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  46. DEFINE_GUID( DDVPTYPE_PHILIPS,         0x332CF160L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  47.  
  48. /*
  49.  * GUIDS used to describe connections
  50.  */
  51.  
  52. #endif
  53.  
  54. /*============================================================================
  55.  *
  56.  * DirectDraw Structures
  57.  *
  58.  * Various structures used to invoke DirectDraw.
  59.  *
  60.  *==========================================================================*/
  61.  
  62. struct IDirectDraw;
  63. struct IDirectDrawSurface;
  64. struct IDirectDrawPalette;
  65. struct IDirectDrawClipper;
  66.  
  67. typedef struct IDDVideoPortContainer        FAR *LPDDVIDEOPORTCONTAINER;
  68. typedef struct IDirectDrawVideoPort        FAR *LPDIRECTDRAWVIDEOPORT;
  69.  
  70. typedef struct _DDVIDEOPORTCONNECT    FAR *LPDDVIDEOPORTCONNECT;
  71. typedef struct _DDVIDEOPORTCAPS        FAR *LPDDVIDEOPORTCAPS;
  72. typedef struct _DDVIDEOPORTDESC        FAR *LPDDVIDEOPORTDESC;
  73. typedef struct _DDVIDEOPORTINFO        FAR *LPDDVIDEOPORTINFO;
  74. typedef struct _DDVIDEOPORTBANDWIDTH    FAR *LPDDVIDEOPORTBANDWIDTH;
  75. typedef struct _DDVIDEOPORTSTATUS    FAR *LPDDVIDEOPORTSTATUS;
  76.  
  77. typedef struct IDDVideoPortContainerVtbl DDVIDEOPORTCONTAINERCALLBACKS;
  78. typedef struct IDirectDrawVideoPortVtbl  DIRECTDRAWVIDEOPORTCALLBACKS;
  79.  
  80.  
  81. /*
  82.  * API's
  83.  */
  84. typedef HRESULT (FAR PASCAL * LPDDENUMVIDEOCALLBACK)(LPDDVIDEOPORTCAPS, LPVOID);
  85.  
  86.  
  87. /*
  88.  * INTERACES FOLLOW:
  89.  *    IDirectDrawVideoPort
  90.  *    IVideoPort
  91.  */
  92.  
  93. /*
  94.  * IDirectDrawVideoPortContainer
  95.  */
  96. #if defined( _WIN32 ) && !defined( _NO_COM )
  97. #undef INTERFACE
  98. #define INTERFACE IDDVideoPortContainer
  99. DECLARE_INTERFACE_( IDDVideoPortContainer, IUnknown )
  100. {
  101.     /*** IUnknown methods ***/
  102.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  103.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  104.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  105.     /*** IDirectDrawVideoPort methods ***/
  106.     STDMETHOD(CreateVideoPort)(THIS_ DWORD, LPDDVIDEOPORTDESC, LPDIRECTDRAWVIDEOPORT FAR *, IUnknown FAR *) PURE;
  107.     STDMETHOD(EnumVideoPorts)(THIS_ DWORD, LPDDVIDEOPORTCAPS, LPVOID,LPDDENUMVIDEOCALLBACK ) PURE;
  108.     STDMETHOD(GetVideoPortConnectInfo)(THIS_ DWORD, LPDWORD, LPDDVIDEOPORTCONNECT ) PURE;
  109.     STDMETHOD(QueryVideoPortStatus)(THIS_ DWORD, LPDDVIDEOPORTSTATUS ) PURE;
  110. };
  111.  
  112. #if !defined(__cplusplus) || defined(CINTERFACE)
  113. #define IVideoPortContainer_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  114. #define IVideoPortContainer_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  115. #define IVideoPortContainer_Release(p)                      (p)->lpVtbl->Release(p)
  116. #define IVideoPortContainer_CreateVideoPort(p, a, b, c, d)  (p)->lpVtbl->CreateVideoPort(p, a, b, c, d)
  117. #define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d)   (p)->lpVtbl->EnumVideoPorts(p, a, b, c, d)
  118. #define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->lpVtbl->GetVideoPortConnectInfo(p, a, b, c)
  119. #define IVideoPortContainer_QueryVideoPortStatus(p, a, b)   (p)->lpVtbl->QueryVideoPortStatus(p, a, b)
  120. #else
  121. #define IVideoPortContainer_QueryInterface(p, a, b)         (p)->QueryInterface(a, b)
  122. #define IVideoPortContainer_AddRef(p)                       (p)->AddRef()
  123. #define IVideoPortContainer_Release(p)                      (p)->Release()
  124. #define IVideoPortContainer_CreateVideoPort(p, a, b, c, d)  (p)->CreateVideoPort(a, b, c, d)
  125. #define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d)   (p)->EnumVideoPorts(a, b, c, d)
  126. #define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->GetVideoPortConnectInfo(a, b, c)
  127. #define IVideoPortContainer_QueryVideoPortStatus(p, a, b)   (p)->QueryVideoPortStatus(a, b)
  128. #endif
  129.  
  130. #endif
  131.  
  132.  
  133. /*
  134.  * IDirectDrawVideoPort
  135.  */
  136. #if defined( _WIN32 ) && !defined( _NO_COM )
  137. #undef INTERFACE
  138. #define INTERFACE IDirectDrawVideoPort
  139. DECLARE_INTERFACE_( IDirectDrawVideoPort, IUnknown )
  140. {
  141.     /*** IUnknown methods ***/
  142.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  143.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  144.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  145.     /*** IVideoPort methods ***/
  146.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  147.     STDMETHOD(GetBandwidthInfo)(THIS_ LPDDPIXELFORMAT, DWORD, DWORD, DWORD, LPDDVIDEOPORTBANDWIDTH) PURE;
  148.     STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
  149.     STDMETHOD(GetInputFormats)(THIS_ LPDWORD, LPDDPIXELFORMAT, DWORD) PURE;
  150.     STDMETHOD(GetOutputFormats)(THIS_ LPDDPIXELFORMAT, LPDWORD, LPDDPIXELFORMAT, DWORD) PURE;
  151.     STDMETHOD(GetFieldPolarity)(THIS_ LPBOOL) PURE;
  152.     STDMETHOD(GetVideoLine)(THIS_ LPDWORD) PURE;
  153.     STDMETHOD(GetVideoSignalStatus)(THIS_ LPDWORD) PURE;
  154.     STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
  155.     STDMETHOD(SetTargetSurface)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  156.     STDMETHOD(StartVideo)(THIS_ LPDDVIDEOPORTINFO) PURE;
  157.     STDMETHOD(StopVideo)(THIS) PURE;
  158.     STDMETHOD(UpdateVideo)(THIS_ LPDDVIDEOPORTINFO) PURE;
  159.     STDMETHOD(WaitForSync)(THIS_ DWORD, DWORD, DWORD) PURE;
  160. };
  161.  
  162. #if !defined(__cplusplus) || defined(CINTERFACE)
  163. #define IVideoPort_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  164. #define IVideoPort_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  165. #define IVideoPort_Release(p)                   (p)->lpVtbl->Release(p)
  166. #define IVideoPort_SetTargetSurface(p,a,b)    (p)->lpVtbl->SetTargetSurface(p,a,b)
  167. #define IVideoPort_Flip(p,a,b)            (p)->lpVtbl->Flip(p,a,b)
  168. #define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->lpVtbl->GetBandwidthInfo(p,a,b,c,d,e)
  169. #define IVideoPort_GetColorControls(p,a)     (p)->lpVtbl->GetColorControls(p,a)
  170. #define IVideoPort_GetInputFormats(p,a,b,c)    (p)->lpVtbl->GetInputFormats(p,a,b,c)
  171. #define IVideoPort_GetOutputFormats(p,a,b,c,d)    (p)->lpVtbl->GetOutputFormats(p,a,b,c,d)
  172. #define IVideoPort_GetFieldPolarity(p,a)    (p)->lpVtbl->GetFieldPolarity(p,a)
  173. #define IVideoPort_GetVideoLine(p,a)        (p)->lpVtbl->GetVideoLine(p,a)
  174. #define IVideoPort_GetVideoSignalStatus(p,a)    (p)->lpVtbl->GetVideoSignalStatus(p,a)
  175. #define IVideoPort_SetColorControls(p,a)    (p)->lpVtbl->SetColorControls(p,a)
  176. #define IVideoPort_StartVideo(p,a)        (p)->lpVtbl->StartVideo(p,a)
  177. #define IVideoPort_StopVideo(p)            (p)->lpVtbl->StopVideo(p)
  178. #define IVideoPort_UpdateVideo(p,a)        (p)->lpVtbl->UpdateVideo(p,a)
  179. #define IVideoPort_WaitForSync(p,a,b,c)        (p)->lpVtbl->WaitForSync(p,a,b,c)
  180. #else
  181. #define IVideoPort_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  182. #define IVideoPort_AddRef(p)                    (p)->AddRef()
  183. #define IVideoPort_Release(p)                   (p)->Release()
  184. #define IVideoPort_SetTargetSurface(p,a,b)    (p)->SetTargetSurface(a,b)
  185. #define IVideoPort_Flip(p,a,b)            (p)->Flip(a,b)
  186. #define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->GetBandwidthInfo(a,b,c,d,e)
  187. #define IVideoPort_GetColorControls(p,a)     (p)->GetColorControls(a)
  188. #define IVideoPort_GetInputFormats(p,a,b,c)    (p)->GetInputFormats(a,b,c)
  189. #define IVideoPort_GetOutputFormats(p,a,b,c,d)    (p)->GetOutputFormats(a,b,c,d)
  190. #define IVideoPort_GetFieldPolarity(p,a)    (p)->GetFieldPolarity(a)
  191. #define IVideoPort_GetVideoLine(p,a)        (p)->GetVideoLine(a)
  192. #define IVideoPort_GetVideoSignalStatus(p,a)    (p)->GetVideoSignalStatus(a)
  193. #define IVideoPort_SetColorControls(p,a)    (p)->SetColorControls(a)
  194. #define IVideoPort_StartVideo(p,a)        (p)->StartVideo(a)
  195. #define IVideoPort_StopVideo(p)            (p)->StopVideo()
  196. #define IVideoPort_UpdateVideo(p,a)        (p)->UpdateVideo(a)
  197. #define IVideoPort_WaitForSync(p,a,b,c)        (p)->WaitForSync(a,b,c)
  198. #endif
  199.  
  200. #endif
  201.  
  202.  
  203. /*
  204.  * DDVIDEOPORTCONNECT
  205.  */
  206. typedef struct _DDVIDEOPORTCONNECT
  207. {
  208.     DWORD dwSize;           // size of the DDVIDEOPORTCONNECT structure
  209.     DWORD dwPortWidth;      // Width of the video port
  210.     GUID  guidTypeID;       // Description of video port connection
  211.     DWORD dwFlags;          // Connection flags
  212.     ULONG_PTR dwReserved1;      // Reserved, set to zero.
  213. } DDVIDEOPORTCONNECT;
  214.  
  215.  
  216. /*
  217.  * DDVIDEOPORTCAPS
  218.  */
  219. typedef struct _DDVIDEOPORTCAPS
  220. {
  221.     DWORD dwSize;            // size of the DDVIDEOPORTCAPS structure
  222.     DWORD dwFlags;            // indicates which fields contain data
  223.     DWORD dwMaxWidth;            // max width of the video port field
  224.     DWORD dwMaxVBIWidth;        // max width of the VBI data
  225.     DWORD dwMaxHeight;             // max height of the video port field
  226.     DWORD dwVideoPortID;        // Video port ID (0 - (dwMaxVideoPorts -1))
  227.     DWORD dwCaps;            // Video port capabilities
  228.     DWORD dwFX;                // More video port capabilities
  229.     DWORD dwNumAutoFlipSurfaces;    // Max number of autoflippable surfaces allowed
  230.     DWORD dwAlignVideoPortBoundary;    // Byte restriction of placement within the surface
  231.     DWORD dwAlignVideoPortPrescaleWidth;// Byte restriction of width after prescaling
  232.     DWORD dwAlignVideoPortCropBoundary;    // Byte restriction of left cropping
  233.     DWORD dwAlignVideoPortCropWidth;    // Byte restriction of cropping width
  234.     DWORD dwPreshrinkXStep;        // Width can be shrunk in steps of 1/x
  235.     DWORD dwPreshrinkYStep;        // Height can be shrunk in steps of 1/x
  236.     DWORD dwNumVBIAutoFlipSurfaces;    // Max number of VBI autoflippable surfaces allowed
  237.     DWORD dwNumPreferredAutoflip;    // Optimal number of autoflippable surfaces for hardware
  238.     WORD  wNumFilterTapsX;              // Number of taps the prescaler uses in the X direction (0 - no prescale, 1 - replication, etc.)
  239.     WORD  wNumFilterTapsY;              // Number of taps the prescaler uses in the Y direction (0 - no prescale, 1 - replication, etc.)
  240. } DDVIDEOPORTCAPS;
  241.  
  242. /*
  243.  * The dwMaxWidth and dwMaxVBIWidth members are valid
  244.  */
  245. #define DDVPD_WIDTH        0x00000001l
  246.  
  247. /*
  248.  * The dwMaxHeight member is valid
  249.  */
  250. #define DDVPD_HEIGHT        0x00000002l
  251.  
  252. /*
  253.  * The dwVideoPortID member is valid
  254.  */
  255. #define DDVPD_ID        0x00000004l
  256.  
  257. /*
  258.  * The dwCaps member is valid
  259.  */
  260. #define DDVPD_CAPS        0x00000008l
  261.  
  262. /*
  263.  * The dwFX member is valid
  264.  */
  265. #define DDVPD_FX        0x00000010l
  266.  
  267. /*
  268.  * The dwNumAutoFlipSurfaces member is valid
  269.  */
  270. #define DDVPD_AUTOFLIP        0x00000020l
  271.  
  272. /*
  273.  * All of the alignment members are valid
  274.  */
  275. #define DDVPD_ALIGN        0x00000040l
  276.  
  277. /*
  278.  * The dwNumPreferredAutoflip member is valid
  279.  */
  280. #define DDVPD_PREFERREDAUTOFLIP 0x00000080l
  281.  
  282. /*
  283.  * The wNumFilterTapsX and wNumFilterTapsY fields are valid
  284.  */
  285. #define DDVPD_FILTERQUALITY     0x00000100l
  286.  
  287. /*
  288.  * DDVIDEOPORTDESC
  289.  */
  290. typedef struct _DDVIDEOPORTDESC
  291. {
  292.     DWORD dwSize;            // size of the DDVIDEOPORTDESC structure
  293.     DWORD dwFieldWidth;            // width of the video port field
  294.     DWORD dwVBIWidth;            // width of the VBI data
  295.     DWORD dwFieldHeight;        // height of the video port field
  296.     DWORD dwMicrosecondsPerField;    // Microseconds per video field
  297.     DWORD dwMaxPixelsPerSecond;        // Maximum pixel rate per second
  298.     DWORD dwVideoPortID;        // Video port ID (0 - (dwMaxVideoPorts -1))
  299.     DWORD dwReserved1;            // Reserved for future use - set to zero (struct padding)
  300.     DDVIDEOPORTCONNECT VideoPortType;     // Description of video port connection
  301.     ULONG_PTR dwReserved2;        // Reserved for future use - set to zero
  302.     ULONG_PTR dwReserved3;        // Reserved for future use - set to zero
  303. } DDVIDEOPORTDESC;
  304.  
  305.  
  306. /*
  307.  * DDVIDEOPORTINFO
  308.  */
  309. typedef struct _DDVIDEOPORTINFO
  310. {
  311.     DWORD dwSize;            // Size of the structure
  312.     DWORD dwOriginX;            // Placement of the video data within the surface.
  313.     DWORD dwOriginY;            // Placement of the video data within the surface.
  314.     DWORD dwVPFlags;            // Video port options
  315.     RECT rCrop;                // Cropping rectangle (optional).
  316.     DWORD dwPrescaleWidth;        // Determines pre-scaling/zooming in the X direction (optional).
  317.     DWORD dwPrescaleHeight;        // Determines pre-scaling/zooming in the Y direction (optional).
  318.     LPDDPIXELFORMAT lpddpfInputFormat;    // Video format written to the video port
  319.     LPDDPIXELFORMAT lpddpfVBIInputFormat; // Input format of the VBI data
  320.     LPDDPIXELFORMAT lpddpfVBIOutputFormat;// Output format of the data
  321.     DWORD dwVBIHeight;            // Specifies the number of lines of data within the vertical blanking interval.
  322.     ULONG_PTR dwReserved1;        // Reserved for future use - set to zero
  323.     ULONG_PTR dwReserved2;        // Reserved for future use - set to zero
  324. } DDVIDEOPORTINFO;
  325.  
  326.  
  327. /*
  328.  * DDVIDEOPORTBANDWIDTH
  329.  */
  330. typedef struct _DDVIDEOPORTBANDWIDTH
  331. {
  332.     DWORD dwSize;            // Size of the structure
  333.     DWORD dwCaps;
  334.     DWORD dwOverlay;                   // Zoom factor at which overlay is supported
  335.     DWORD dwColorkey;            // Zoom factor at which overlay w/ colorkey is supported
  336.     DWORD dwYInterpolate;        // Zoom factor at which overlay w/ Y interpolation is supported
  337.     DWORD dwYInterpAndColorkey;        // Zoom factor at which ovelray w/ Y interpolation and colorkeying is supported
  338.     ULONG_PTR dwReserved1;        // Reserved for future use - set to zero
  339.     ULONG_PTR dwReserved2;        // Reserved for future use - set to zero
  340. } DDVIDEOPORTBANDWIDTH;
  341.  
  342.  
  343. /*
  344.  * DDVIDEOPORTSTATUS
  345.  */
  346. typedef struct _DDVIDEOPORTSTATUS
  347. {
  348.     DWORD dwSize;            // Size of the structure
  349.     BOOL  bInUse;            // TRUE if video port is currently being used
  350.     DWORD dwFlags;                   // Currently not used
  351.     DWORD dwReserved1;            // Reserved for future use
  352.     DDVIDEOPORTCONNECT VideoPortType;    // Information about the connection
  353.     ULONG_PTR dwReserved2;        // Reserved for future use
  354.     ULONG_PTR dwReserved3;        // Reserved for future use
  355. } DDVIDEOPORTSTATUS;
  356.  
  357. /*============================================================================
  358.  *
  359.  * Video Port Flags
  360.  *
  361.  * All flags are bit flags.
  362.  *
  363.  *==========================================================================*/
  364.  
  365. /****************************************************************************
  366.  *
  367.  * VIDEOPORT DDVIDEOPORTCONNECT FLAGS
  368.  *
  369.  ****************************************************************************/
  370.  
  371. /*
  372.  * When this is set by the driver and passed to the client, this
  373.  * indicates that the video port is capable of double clocking the data.
  374.  * When this is set by the client, this indicates that the video port
  375.  * should enable double clocking.  This flag is only valid with external
  376.  * syncs.
  377.  */
  378. #define DDVPCONNECT_DOUBLECLOCK            0x00000001l
  379.  
  380. /*
  381.  * When this is set by the driver and passed to the client, this
  382.  * indicates that the video port is capable of using an external VACT
  383.  * signal. When this is set by the client, this indicates that the
  384.  * video port should use the external VACT signal.
  385.  */
  386. #define DDVPCONNECT_VACT            0x00000002l
  387.  
  388. /*
  389.  * When this is set by the driver and passed to the client, this
  390.  * indicates that the video port is capable of treating even fields
  391.  * like odd fields and visa versa.  When this is set by the client,
  392.  * this indicates that the video port should treat even fields like odd
  393.  * fields.
  394.  */
  395. #define DDVPCONNECT_INVERTPOLARITY        0x00000004l
  396.  
  397. /*
  398.  * Indicates that any data written to the video port during the VREF
  399.  * period will not be written into the frame buffer. This flag is read only.
  400.  */
  401. #define DDVPCONNECT_DISCARDSVREFDATA        0x00000008l
  402.  
  403. /*
  404.  * When this is set be the driver and passed to the client, this
  405.  * indicates that the device will write half lines into the frame buffer
  406.  * if half lines are provided by the decoder.  If this is set by the client,
  407.  * this indicates that the decoder will be supplying half lines.
  408.  */
  409. #define DDVPCONNECT_HALFLINE            0x00000010l
  410.  
  411. /*
  412.  * Indicates that the signal is interlaced. This flag is only
  413.  * set by the client.
  414.  */
  415. #define DDVPCONNECT_INTERLACED            0x00000020l
  416.  
  417. /*
  418.  * Indicates that video port is shareable and that this video port
  419.  * will use the even fields.  This flag is only set by the client.
  420.  */
  421. #define DDVPCONNECT_SHAREEVEN            0x00000040l
  422.  
  423. /*
  424.  * Indicates that video port is shareable and that this video port
  425.  * will use the odd fields.  This flag is only set by the client.
  426.  */
  427. #define DDVPCONNECT_SHAREODD            0x00000080l
  428.  
  429. /****************************************************************************
  430.  *
  431.  * VIDEOPORT DDVIDEOPORTDESC CAPS
  432.  *
  433.  ****************************************************************************/
  434.  
  435. /*
  436.  * Flip can be performed automatically to avoid tearing.
  437.  */
  438. #define DDVPCAPS_AUTOFLIP            0x00000001l
  439.  
  440. /*
  441.  * Supports interlaced video
  442.  */
  443. #define DDVPCAPS_INTERLACED            0x00000002l
  444.  
  445. /*
  446.  * Supports non-interlaced video
  447.  */
  448. #define DDVPCAPS_NONINTERLACED            0x00000004l
  449.  
  450. /*
  451.  * Indicates that the device can return whether the current field
  452.  * of an interlaced signal is even or odd.
  453.  */
  454. #define DDVPCAPS_READBACKFIELD            0x00000008l
  455.  
  456. /*
  457.  * Indicates that the device can return the current line of video
  458.  * being written into the frame buffer.
  459.  */
  460. #define DDVPCAPS_READBACKLINE            0x00000010l
  461.  
  462. /*
  463.  * Allows two gen-locked video streams to share a single video port,
  464.  * where one stream uses the even fields and the other uses the odd
  465.  * fields. Separate parameters (including address, scaling,
  466.  * cropping, etc.) are maintained for both fields.)
  467.  */
  468. #define DDVPCAPS_SHAREABLE            0x00000020l
  469.  
  470. /*
  471.  * Even fields of video can be automatically discarded.
  472.  */
  473. #define DDVPCAPS_SKIPEVENFIELDS            0x00000040l
  474.  
  475. /*
  476.  * Odd fields of video can be automatically discarded.
  477.  */
  478. #define DDVPCAPS_SKIPODDFIELDS            0x00000080l
  479.  
  480. /*
  481.  * Indicates that the device is capable of driving the graphics
  482.  * VSYNC with the video port VSYNC.
  483.  */
  484. #define DDVPCAPS_SYNCMASTER            0x00000100l
  485.  
  486. /*
  487.  * Indicates that data within the vertical blanking interval can
  488.  * be written to a different surface.
  489.  */
  490. #define DDVPCAPS_VBISURFACE            0x00000200l
  491.  
  492. /*
  493.  * Indicates that the video port can perform color operations
  494.  * on the incoming data before it is written to the frame buffer.
  495.  */
  496. #define DDVPCAPS_COLORCONTROL            0x00000400l
  497.  
  498. /*
  499.  * Indicates that the video port can accept VBI data in a different
  500.  * width or format than the regular video data.
  501.  */
  502. #define DDVPCAPS_OVERSAMPLEDVBI            0x00000800l
  503.  
  504. /*
  505.  * Indicates that the video port can write data directly to system memory
  506.  */
  507. #define DDVPCAPS_SYSTEMMEMORY            0x00001000l
  508.  
  509. /*
  510.  * Indicates that the VBI and video portions of the video stream can
  511.  * be controlled by an independent processes.
  512.  */
  513. #define DDVPCAPS_VBIANDVIDEOINDEPENDENT        0x00002000l
  514.  
  515. /*
  516.  * Indicates that the video port contains high quality hardware
  517.  * de-interlacing hardware that should be used instead of the
  518.  * bob/weave algorithms.
  519.  */
  520. #define DDVPCAPS_HARDWAREDEINTERLACE        0x00004000l
  521.  
  522.  
  523. /****************************************************************************
  524.  *
  525.  * VIDEOPORT DDVIDEOPORTDESC FX
  526.  *
  527.  ****************************************************************************/
  528.  
  529. /*
  530.  * Limited cropping is available to crop out the vertical interval data.
  531.  */
  532. #define DDVPFX_CROPTOPDATA            0x00000001l
  533.  
  534. /*
  535.  * Incoming data can be cropped in the X direction before it is written
  536.  * to the surface.
  537.  */
  538. #define DDVPFX_CROPX                0x00000002l
  539.  
  540. /*
  541.  * Incoming data can be cropped in the Y direction before it is written
  542.  * to the surface.
  543.  */
  544. #define DDVPFX_CROPY                0x00000004l
  545.  
  546. /*
  547.  * Supports interleaving interlaced fields in memory.
  548.  */
  549. #define DDVPFX_INTERLEAVE            0x00000008l
  550.  
  551. /*
  552.  * Supports mirroring left to right as the video data is written
  553.  * into the frame buffer.
  554.  */
  555. #define DDVPFX_MIRRORLEFTRIGHT            0x00000010l
  556.  
  557. /*
  558.  * Supports mirroring top to bottom as the video data is written
  559.  * into the frame buffer.
  560.  */
  561. #define DDVPFX_MIRRORUPDOWN            0x00000020l
  562.  
  563. /*
  564.  * Data can be arbitrarily shrunk in the X direction before it
  565.  * is written to the surface.
  566.  */
  567. #define DDVPFX_PRESHRINKX            0x00000040l
  568.  
  569. /*
  570.  * Data can be arbitrarily shrunk in the Y direction before it
  571.  * is written to the surface.
  572.  */
  573. #define DDVPFX_PRESHRINKY            0x00000080l
  574.  
  575. /*
  576.  * Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the X
  577.  * direction before it is written to the surface.
  578.  */
  579. #define DDVPFX_PRESHRINKXB            0x00000100l
  580.  
  581. /*
  582.  * Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the Y
  583.  * direction before it is written to the surface.
  584.  */
  585. #define DDVPFX_PRESHRINKYB            0x00000200l
  586.  
  587. /*
  588.  * Data can be shrunk in increments of 1/x in the X direction
  589.  * (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkXStep)
  590.  * before it is written to the surface.
  591.  */
  592. #define DDVPFX_PRESHRINKXS            0x00000400l
  593.  
  594. /*
  595.  * Data can be shrunk in increments of 1/x in the Y direction
  596.  * (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkYStep)
  597.  * before it is written to the surface.
  598.  */
  599. #define DDVPFX_PRESHRINKYS            0x00000800l
  600.  
  601. /*
  602.  * Data can be arbitrarily stretched in the X direction before
  603.  * it is written to the surface.
  604.  */
  605. #define DDVPFX_PRESTRETCHX            0x00001000l
  606.  
  607. /*
  608.  * Data can be arbitrarily stretched in the Y direction before
  609.  * it is written to the surface.
  610.  */
  611. #define DDVPFX_PRESTRETCHY            0x00002000l
  612.  
  613. /*
  614.  * Data can be integer stretched in the X direction before it is
  615.  * written to the surface.
  616.  */
  617. #define DDVPFX_PRESTRETCHXN            0x00004000l
  618.  
  619. /*
  620.  * Data can be integer stretched in the Y direction before it is
  621.  * written to the surface.
  622.  */
  623. #define DDVPFX_PRESTRETCHYN            0x00008000l
  624.  
  625. /*
  626.  * Indicates that data within the vertical blanking interval can
  627.  * be converted independently of the remaining video data.
  628.  */
  629. #define DDVPFX_VBICONVERT            0x00010000l
  630.  
  631. /*
  632.  * Indicates that scaling can be disabled for data within the
  633.  * vertical blanking interval.
  634.  */
  635. #define DDVPFX_VBINOSCALE            0x00020000l
  636.  
  637. /*
  638.  * Indicates that the video data can ignore the left and right
  639.  * cropping coordinates when cropping oversampled VBI data.
  640.  */
  641. #define DDVPFX_IGNOREVBIXCROP            0x00040000l
  642.  
  643. /*
  644.  * Indicates that interleaving can be disabled for data within the
  645.  * vertical blanking interval.
  646.  */
  647. #define DDVPFX_VBINOINTERLEAVE            0x00080000l
  648.  
  649.  
  650. /****************************************************************************
  651.  *
  652.  * VIDEOPORT DDVIDEOPORTINFO FLAGS
  653.  *
  654.  ****************************************************************************/
  655.  
  656. /*
  657.  * Perform automatic flipping.   Auto-flipping is performed between
  658.  * the overlay surface that was attached to the video port using
  659.  * IDirectDrawVideoPort::AttachSurface and the overlay surfaces that
  660.  * are attached to the surface via the IDirectDrawSurface::AttachSurface
  661.  * method.  The flip order is the order in which the overlay surfaces
  662.  * were. attached.
  663.  */
  664. #define DDVP_AUTOFLIP                0x00000001l
  665.  
  666. /*
  667.  * Perform conversion using the ddpfOutputFormat information.
  668.  */
  669. #define DDVP_CONVERT                0x00000002l
  670.  
  671. /*
  672.  * Perform cropping using the specified rectangle.
  673.  */
  674. #define DDVP_CROP                0x00000004l
  675.  
  676. /*
  677.  * Indicates that interlaced fields should be interleaved in memory.
  678.  */
  679. #define DDVP_INTERLEAVE                0x00000008l
  680.  
  681. /*
  682.  * Indicates that the data should be mirrored left to right as it's
  683.  * written into the frame buffer.
  684.  */
  685. #define DDVP_MIRRORLEFTRIGHT            0x00000010l
  686.  
  687. /*
  688.  * Indicates that the data should be mirrored top to bottom as it's
  689.  * written into the frame buffer.
  690.  */
  691. #define DDVP_MIRRORUPDOWN            0x00000020l
  692.  
  693. /*
  694.  * Perform pre-scaling/zooming based on the pre-scale parameters.
  695.  */
  696. #define DDVP_PRESCALE                0x00000040l
  697.  
  698. /*
  699.  * Ignore input of even fields.
  700.  */
  701. #define DDVP_SKIPEVENFIELDS            0x00000080l
  702.  
  703. /*
  704.  * Ignore input of odd fields.
  705.  */
  706. #define DDVP_SKIPODDFIELDS            0x00000100l
  707.  
  708. /*
  709.  * Drive the graphics VSYNCs using the video port VYSNCs.
  710.  */
  711. #define DDVP_SYNCMASTER                0x00000200l
  712.  
  713. /*
  714.  * The ddpfVBIOutputFormatFormat member contains data that should be used
  715.  * to convert the data within the vertical blanking interval.
  716.  */
  717. #define DDVP_VBICONVERT                0x00000400l
  718.  
  719. /*
  720.  * Indicates that data within the vertical blanking interval
  721.  * should not be scaled.
  722.  */
  723. #define DDVP_VBINOSCALE                0x00000800l
  724.  
  725. /*
  726.  * Indicates that these bob/weave decisions should not be
  727.  * overriden by other interfaces.
  728.  */
  729. #define DDVP_OVERRIDEBOBWEAVE            0x00001000l
  730.  
  731. /*
  732.  * Indicates that the video data should ignore the left and right
  733.  * cropping coordinates when cropping the VBI data.
  734.  */
  735. #define DDVP_IGNOREVBIXCROP            0x00002000l
  736.  
  737. /*
  738.  * Indicates that interleaving can be disabled for data within the
  739.  * vertical blanking interval.
  740.  */
  741. #define DDVP_VBINOINTERLEAVE            0x00004000l
  742.  
  743. /*
  744.  * Indicates that the video port should use the hardware
  745.  * de-interlacing hardware.
  746.  */
  747. #define DDVP_HARDWAREDEINTERLACE        0x00008000l
  748.  
  749. /****************************************************************************
  750.  *
  751.  * DIRIRECTDRAWVIDEOPORT GETINPUTFORMAT/GETOUTPUTFORMAT FLAGS
  752.  *
  753.  ****************************************************************************/
  754.  
  755. /*
  756.  * Return formats for the video data
  757.  */
  758. #define DDVPFORMAT_VIDEO            0x00000001l
  759.  
  760. /*
  761.  * Return formats for the VBI data
  762.  */
  763. #define DDVPFORMAT_VBI                0x00000002l
  764.  
  765. /****************************************************************************
  766.  *
  767.  * DIRIRECTDRAWVIDEOPORT SETTARGETSURFACE FLAGS
  768.  *
  769.  ****************************************************************************/
  770.  
  771. /*
  772.  * Surface should receive video data (and VBI data if a surface
  773.  * is not explicitly attached for that purpose)
  774.  */
  775. #define DDVPTARGET_VIDEO            0x00000001l
  776.  
  777. /*
  778.  * Surface should receive VBI data
  779.  */
  780. #define DDVPTARGET_VBI                0x00000002l
  781.  
  782.  
  783. /****************************************************************************
  784.  *
  785.  * DIRIRECTDRAWVIDEOPORT WAITFORSYNC FLAGS
  786.  *
  787.  ****************************************************************************/
  788.  
  789. /*
  790.  * Waits until the beginning of the next VSYNC
  791.  */
  792. #define DDVPWAIT_BEGIN                0x00000001l
  793.  
  794. /*
  795.  * Waits until the end of the next/current VSYNC
  796.  */
  797. #define DDVPWAIT_END                0x00000002l
  798.  
  799. /*
  800.  * Waits until the beginning of the specified line
  801.  */
  802. #define DDVPWAIT_LINE                0x00000003l
  803.  
  804. /****************************************************************************
  805.  *
  806.  * DIRECTDRAWVIDEOPORT FLIP FLAGS
  807.  *
  808.  ****************************************************************************/
  809.  
  810. /*
  811.  * Flips the normal video surface
  812.  */
  813. #define DDVPFLIP_VIDEO                0x00000001l
  814.  
  815. /*
  816.  * Flips the VBI surface
  817.  */
  818. #define DDVPFLIP_VBI                0x00000002l
  819.  
  820. /****************************************************************************
  821.  *
  822.  * DIRIRECTDRAWVIDEOPORT GETVIDEOSIGNALSTATUS VALUES
  823.  *
  824.  ****************************************************************************/
  825.  
  826. /*
  827.  * No video signal is present at the video port
  828.  */
  829. #define DDVPSQ_NOSIGNAL                0x00000001l
  830.  
  831. /*
  832.  * A valid video signal is present at the video port
  833.  */
  834. #define DDVPSQ_SIGNALOK                0x00000002l
  835.  
  836. /****************************************************************************
  837.  *
  838.  * VIDEOPORTBANDWIDTH Flags
  839.  *
  840.  ****************************************************************************/
  841.  
  842. /*
  843.  * The specified height/width refer to the size of the video port data
  844.  * written into memory, after prescaling has occured.
  845.  */
  846. #define DDVPB_VIDEOPORT                0x00000001l
  847.  
  848. /*
  849.  * The specified height/width refer to the source size of the overlay.
  850.  */
  851. #define DDVPB_OVERLAY                0x00000002l
  852.  
  853. /*
  854.  * This is a query for the device to return which caps this device requires.
  855.  */
  856. #define DDVPB_TYPE                0x00000004l
  857.  
  858. /****************************************************************************
  859.  *
  860.  * VIDEOPORTBANDWIDTH Caps
  861.  *
  862.  ****************************************************************************/
  863.  
  864. /*
  865.  * The bandwidth for this device is dependant on the overlay source size.
  866.  */
  867. #define DDVPBCAPS_SOURCE            0x00000001l
  868.  
  869. /*
  870.  * The bandwidth for this device is dependant on the overlay destination
  871.  * size.
  872.  */
  873. #define DDVPBCAPS_DESTINATION            0x00000002l
  874.  
  875. /****************************************************************************
  876.  *
  877.  * DDVIDEOPORTCONTAINER CreateVideoPort flags
  878.  *
  879.  ****************************************************************************/
  880.  
  881. /*
  882.  * The process only wants to control the VBI portion of the video stream.
  883.  */
  884. #define DDVPCREATE_VBIONLY            0x00000001l
  885.  
  886. /*
  887.  * The process only wants to control the non-VBI (video) portion of
  888.  * the video stream.
  889.  */
  890. #define DDVPCREATE_VIDEOONLY            0x00000002l
  891.  
  892. /****************************************************************************
  893.  *
  894.  * DDVIDEOPORTSTATUS flags
  895.  *
  896.  ****************************************************************************/
  897.  
  898. /*
  899.  * The video port interface is only controlling the VBI portion of the
  900.  * video stream
  901.  */
  902. #define DDVPSTATUS_VBIONLY            0x00000001l
  903.  
  904. /*
  905.  * The video port interface is only controlling the video portion of the
  906.  * video stream
  907.  */
  908. #define DDVPSTATUS_VIDEOONLY            0x00000002l
  909.  
  910.  
  911. #ifdef __cplusplus
  912. };
  913. #endif
  914.  
  915. #endif
  916.